package com.jinsp.skinlibrary;

import android.os.Environment;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.view.View;

import com.jinsp.skinlib.SkinLibrary;

public class MainActivity2 extends AppCompatActivity {

    private boolean flag;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main2);
    }

    public void onClick(View view) {
        if (flag) {
            flag = false;
            SkinLibrary.changeResource(this, null);
        } else {
            flag = true;
            SkinLibrary.changeResource(this, Environment.getExternalStorageDirectory().getPath() + "/test.skin");
        }
    }
}